package com.cloud.api.domain.alarm;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cloud.api.myenum.AlarmTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import jakarta.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * OLAP
 * </p>
 *
 * @author haohaibo
 * @since 2024-01-23
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("t_vehicle_alarm")
@Schema(name = "VehicleAlarm", description = "")
public class VehicleAlarm implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    @TableId("id")
    @NotEmpty(message = "{validation.common.id}")
    private String id;

    @Schema(description = "车辆类型")
    @TableField(exist = false)
    private String vehicleType;

    @Schema(description = "车辆报警时间")
    @TableField("alarm_time")
//    @NotNull(message = "{validation.alarm.alarmTime}")
    private LocalDateTime alarmTime;

    @Schema(description = "vin")
    @TableField("vin")
//    @NotEmpty(message = "{validation.Information.vin}")
    private String vin;

    @Schema(description = "车型id")
    @TableField("model_id")
    private String modelId;

    @Schema(description = "车牌号")
    @TableField("license_number")
    private String licenseNumber;

    @Schema(description = "报警级别")
    @TableField("alarm_level")
    private Integer alarmLevel;

    @Schema(description = "报警类型")
    @TableField("alarm_type")
    private AlarmTypeEnum alarmType;

    @Schema(description = "报警类型code",hidden = true)
    @TableField(exist = false)
    private String alarmTypeId;

    @Schema(description = "报警信息")
    @TableField("alarm_info")
    private String alarmInfo;

    @Schema(description = "报警位置")
    @TableField("alarm_address")
    private String alarmAddress;

    @Schema(description = "报警处理时间")
    @TableField("resolve_time")
    private LocalDateTime resolveTime;

    @Schema(description = "1:报警已处理")
    @TableField("status")
    private Integer status;

    @Schema(description = "电话")
    @TableField("phone_number")
    @NotEmpty(message = "{validation.alarm.phoneNumber}")
    private String phoneNumber;

    @Schema(description = "处理人")
    @TableField("handler")
    @NotEmpty(message = "{validation.alarm.handler}")
    private String handler;

    @Schema(description = "报警原因")
    @TableField("alarm_reason")
    @NotEmpty(message = "{validation.alarm.alarmReason}")
    private String alarmReason;

    @Schema(description = "建议处理办法")
    @TableField("suggest_handle_method")
    @NotEmpty(message = "{validation.alarm.suggestHandleMethod}")
    private String suggestHandleMethod;

    @Schema(description = "备注")
    @TableField("remark")
    private String remark;
}
